home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI O2 Out of Box Experience 2.2
/
SGI O2 Out of Box Experience 2.2.iso
/
cgi-bin
/
nph-startSysSetup.cgi
< prev
next >
Wrap
Text File
|
1998-05-26
|
4KB
|
88 lines
#!/bin/sh
#**************************************************************************
#* *
#* Copyright (c) 1993 Silicon Graphics, Inc. *
#* All Rights Reserved *
#* *
#* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF SGI *
#* *
#* The copyright notice above does not evidence any actual of intended *
#* publication of such source code, and is an unpublished work by Silicon *
#* Graphics, Inc. This material contains CONFIDENTIAL INFORMATION that is *
#* the property of Silicon Graphics, Inc. Any use, duplication or *
#* disclosure not specifically authorized by Silicon Graphics is strictly *
#* prohibited. *
#* *
#* RESTRICTED RIGHTS LEGEND: *
#* *
#* Use, duplication or disclosure by the Government is subject to *
#* restrictions as set forth in subdivision (c)(1)(ii) of the Rights in *
#* Technical Data and Computer Software clause at DFARS 52.227-7013, *
#* and/or in similar or successor clauses in the FAR, DOD or NASA FAR *
#* Supplement. Unpublished - rights reserved under the Copyright Laws of *
#* the United States. Contractor is SILICON GRAPHICS, INC., 2011 N. *
#* Shoreline Blvd., Mountain View, CA 94039-7311 *
#**************************************************************************
server_protocol=$SERVER_PROTOCOL;
server_software=$SERVER_SOFTWARE;
/sbin/echo "$server_protocol 200 OK"
/sbin/echo "Server: $server_software"
/sbin/echo "Content-Type: text/html";
/sbin/echo "Expires: 0\n";
# Print header
/sbin/echo "<html>\n";
/sbin/echo "<body bgcolor=\"#000000\" text=\"#996688\">\n";
/sbin/echo "<PRE>\n";
/sbin/echo "</PRE>\n";
/sbin/echo "<h2> Starting System Setup...</h2>\n";
/sbin/echo "<P>\n";
/sbin/echo " <FONT SIZE="3">It may take up to 30 seconds to start this tool.</FONT>\n";
/sbin/echo "<BR>\n";
/sbin/echo " <FONT SIZE="3">Please be patient.</FONT>\n";
/sbin/echo "</P>\n";
/sbin/echo "</body>\n";
/sbin/echo "</html>\n";
DISPLAY=:0.0
export DISPLAY
# Because we are starting from CGI, we need to reset the
# $HOME so that Netscape can find the preferences file and
# cache directory.
HOME=/tmp/.sset; export HOME
TMPDIR=/tmp; export TMPDIR
# This is centered placement for a 1280x1024 display size
locn="+292+163"
# By using websupport/browser we don't need to check to see if EZsetup has
# already been started since the browser will cache the hyperlink and
# not ask for another CGI script to be fired up. If this behavior is
# changed or if some fool adds "Expires: 0\n\n" to the end of the HTTP
# header then we will have to do the following grep-if stuff
#
# found=`/sbin/ps -ef | /sbin/grep "/usr/lib/websupport/browser -geometry $locn http://localhost/SysSetup/en_" | /sbin/grep -v grep `
# if [ -n "$found" ]; then
# /usr/bin/X11/xconfirm -c -B "OK" -icon progress \
# -font '-*-helvetica-medium-r-narrow--19-*-*-*-p-83-iso8859-1' \
# -t "System Setup has already been started..." > /dev/null
# exit
# fi
# Since EZsetup no longer has a dependency on the web server, it
# can't run as the user "nobody" anymore due to write permission issues.
/sbin/su - EZsetup -c "/var/sysadmdesktop/EZsetup/SysSetup/bin/browser -display :0.0 -geometry 730x746+$locn file://localhost/var/sysadmdesktop/EZsetup/SysSetup/en_US/Base/SysSetup.html 1\>/dev/null 2\>\&1"
# turn the area black again.
/sbin/echo "<html>\n";
/sbin/echo "<body bgcolor=\"#000000\">\n";
/sbin/echo "</body>\n";
/sbin/echo "</html>\n";